import java.util.Arrays;
import java.util.Scanner;

/**
 * 
 */

/**
 * @author zhongfang
 *
 */
public class 网易23 {
	   public static int[] getArray(int [] x,int [] y, int number) {
		   	//存放结果
			int [] result =new int [number];
			Arrays.fill(result, Integer.MAX_VALUE);
			int [] distance = new int [number];
			for (int i = 0; i < distance.length; i++) {
				for (int j = 0; j < distance.length; j++) {
					for (int k = 0; k < distance.length; k++) {
						distance[k] = Math.abs(x[k]-x[i])+Math.abs(y[k]-y[j]);
					}
					Arrays.sort(distance);
					int sum = 0;
					for (int k = 0; k < distance.length; k++) {
						sum+= distance[k];
						result[k] = Math.min(result[k], sum);
					}
				}
			}
			return result;
	   }
	  
	    public static void main(String[] args) {
	        Scanner scanner = new Scanner(System.in);
	        while (scanner.hasNext()) {
				int n = scanner.nextInt();
				int [] x =new int [n];
				int [] y = new int [n];
				
				for (int i = 0; i < n; i++) {
					x[i] = scanner.nextInt();
				}
				for (int i = 0; i < n; i++) {
					y[i] = scanner.nextInt();
				}
				
				//存放结果
				int [] result =new int [n];
				result = getArray(x,y,n);
				for (int i = 0; i < result.length-1; i++) {
					System.out.print(result[i]+" ");
				}
				System.out.println(result[result.length-1]);
			}
	        
	    }
	}



